package com.pqy.ts.handle;

import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author panqiyi
 * @date 2022/6/5 - 21:23
 */
@Component
public class MyMetaObjectHandler implements MetaObjectHandler {
    @Override
    public void insertFill(MetaObject metaObject) {
        // 新增 时给哪些字段自动配置哪些数据
        this.setFieldValByName("tCreate",new Date(),metaObject);
    }

    @Override
    public void updateFill(MetaObject metaObject) {

    }
}